<!--{template admin/tpl/header}-->

<div class="mainarea">
<!--{if empty($_GET['op'])}-->
	<div class="maininner">
		<form method="get" action="admincp.php">
		<div class="block style4">
			<table cellspacing="3" cellpadding="3">
				<tr><th>公司名*</th><td><input type="text" name="tagname" value="$_GET[tagname]"></td>
					<th>指定公司ID</th>
					<td>
						<input type="text" name="tagid" value="$_GET[tagid]" />
					</td>
				</tr>
				<tr>
					<th>是否通过审核</th><td>
					<select name="status">
					<option value="">不限制</option>
					<option value="0"$statuss[0]>未审核</option>
					<option value="1"$statuss[1]>已审核</option>
					</select>
					</td>
				</tr>
				<tr>
					<th>是否锁定</th><td>
					<select name="close">
					<option value="">不限制</option>
					<option value="1"<!--{if $_GET[close]==1}--> selected<!--{/if}-->>锁定</option>
					</select>
					</td>
					<th>是否推荐</th><td>
					<select name="recommend">
					<option value="">不限制</option>
					<option value="1"<!--{if $_GET[recommend]==1}--> selected<!--{/if}-->>推荐</option>
					</select>
					</td>
				</tr>
				
				<tr>
					<th>加入权限</th>
					<td>
						<select name="joinperm">
							<option value="">全部</option>
							<option value="0"$joinperms[0]>公开</option>
							<option value="1"$joinperms[1]>审核</option>
							<option value="2"$joinperms[2]>私密</option>
						</select>
					</td>
					<th>浏览权限</th>
					<td>
						<select name="viewperm">
							<option value="">全部</option>
							<option value="0"$viewperms[0]>公开</option>
							<option value="1"$viewperms[1]>封闭</option>
						</select>
					</td>
				</tr>
				<tr>
					
					<th>发帖权限</th>
					<td>
						<select name="threadperm">
							<option value="">全部</option>
							<option value="0"$threadperms[0]>仅成员可发话题</option>
							<option value="1"$threadperms[1]>所有人可以发话题</option>
						</select>
					</td>
					<th>回帖权限</th>
					<td>
						<select name="postperm">
							<option value="">全部</option>
							<option value="0"$postperms[0]>仅成员可回帖</option>
							<option value="1"$postperms[1]>所有人可以回帖</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>归属栏目</th><td colspan="3">
					<select name="fieldid">
					<option value="">全部</option>
					<!--{loop $_SGLOBAL[profield] $value}-->
					<option value="$value[fieldid]"<!--{if $_GET[fieldid]==$value[fieldid]}--> selected<!--{/if}-->>$value[title]</option>
					<!--{/loop}-->
					</select>
					</td>
				</tr>
				<tr><th>用户数</th><td colspan="3">
					<input type="text" name="membernum1" value="$_GET[membernum1]" size="10"> ~
					<input type="text" name="membernum2" value="$_GET[membernum2]" size="10">
				</td></tr>
				<tr><th>话题数</th><td colspan="3">
					<input type="text" name="threadnum1" value="$_GET[threadnum1]" size="10"> ~
					<input type="text" name="threadnum2" value="$_GET[threadnum2]" size="10">
				</td></tr>
				<tr>
				<th>回帖数</th>
				<td colspan="3">
					<input type="text" name="postnum1" value="$_GET[postnum1]" size="10"> ~
					<input type="text" name="postnum2" value="$_GET[postnum2]" size="10">
				</td>
				</tr>
				<tr>
					<th>结果排序</th>
					<td colspan="3">
						<select name="orderby">
						<option value="">默认排序</option>
						<option value="membernum"$orderby[membernum]>成员数</option>
						<option value="threadnum"$orderby[threadnum]>话题数</option>
						<option value="postnum"$orderby[postnum]>回帖数</option>
						</select>
						<select name="ordersc">
						<option value="desc"$ordersc[desc]>递减</option>
						<option value="asc"$ordersc[asc]>递增</option>
						</select>
						<select name="perpage">
						<option value="20"$perpages[20]>每页显示20个</option>
						<option value="50"$perpages[50]>每页显示50个</option>
						<option value="100"$perpages[100]>每页显示100个</option>
						</select>
						<input type="hidden" name="ac" value="mtag">
						<input type="submit" name="searchsubmit" value="搜索" class="submit">
					</td>
				</tr>
			</table>
		</div>
		</form>
	<!--{if $list}-->
		<form method="post" action="admincp.php?ac=mtag">
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		<div class="bdrcontent">
		<table cellspacing="0" cellpadding="0" class="formtable">
			<tr>
				<th>公司名</th>
				<th>分类</th>
				<th width="80">用户数</th>
				<th width="80">话题数</th>
				<th width="80">回帖数</th>
				<th width="100">公司管理</th>
			</tr>
			<!--{loop $list $value}-->
			<tr>
				<td><input type="<!--{if $managebatch}-->checkbox<!--{else}-->radio<!--{/if}-->" name="ids[]" value="$value[tagid]">
				<a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank">$value[tagname]</a>
					<!--{if $value[close]}-->(<a href="admincp.php?ac=mtag&close=$value[close]">锁定</a>)<!--{/if}-->
					<!--{if $value[recommend]}-->(<a href="admincp.php?ac=mtag&recommend=$value[recommend]">推荐</a>)<!--{/if}-->
				</td>
				<td><a href="admincp.php?ac=mtag&fieldid=$value[fieldid]">{$_SGLOBAL[profield][$value[fieldid]][title]}</a></td>
				<td>$value[membernum]</td>
				<td>$value[threadnum]</td>
				<td>$value[postnum]</td>
				<td>[<a href="admincp.php?ac=mtag&op=manage&tagid=$value[tagid]" >公司管理</a>]</td>
			</tr>
			<!--{/loop}-->
		</table>
		</div>
		<div class="footactions" style="text-align:left;line-height:2.5em;">
			<input type="hidden" name="mpurl" value="$mpurl">
			<!--{if $managebatch}-->
			<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')">全选 &nbsp; 请选择操作类型：<br>
			<!--{/if}-->
			<input type="radio" name="optype" value="delete"> 删除(公司里面的帖子也会删除)<br>
			<input type="radio" name="optype" value="close"> 锁定
			<input type="radio" name="optype" value="open"> 取消锁定<br>
			<input type="radio" name="optype" value="recommend"> 推荐
			<input type="radio" name="optype" value="unrecommend"> 取消推荐
			<br>
			<input type="radio" name="optype" value="move"> 转移到新分类:
				<select name="move_newfieldid">
				<!--{loop $_SGLOBAL[profield] $value}-->
				<option value="$value[fieldid]">$value[title]</option>
				<!--{/loop}-->
				</select>
			<br>
			<input type="radio" name="optype" value="merge"> 合并到其他公司:
				<select name="merge_newfieldid">
				<!--{loop $_SGLOBAL[profield] $value}-->
				<option value="$value[fieldid]">$value[title]</option>
				<!--{/loop}-->
				</select>
				公司名：<input type="text" name="newtagname" value="" size="5">
			<br>
			<input type="submit" name="opsubmit" value="执行操作" onclick="return confirm('本操作不可恢复，确认继续？');" class="submit">
			<div class="pages">$multi</div>
		</div>
		</form>
	<!--{else}-->
		<div class="bdrcontent">
			<p>指定条件下还没有数据</p>
		</div>
	<!--{/if}-->
	</div>
<!--{else}-->
	<div class="maininner">
	<!--{if $cinfo}-->
		<form method="post" action="admincp.php?ac=mtag&op=manage">
			<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
			<div class="bdrcontent">
			<!--{loop $cinfo $value}-->
			<table cellspacing="3" cellpadding="3">
				<tr>
					<th>公司名称</th>
					<td>$value[tagname]</td>
				</tr>
				<tr>
					<th>公司证件</th>
					<td class='photobox'><img src="$value[corporation_papers]" /></td>
				</tr>
				<tr>
					<th>审核公司</th>
					<td>
						<input type="radio" name="status" value="1" checked> 审核通过
						<input type="radio" name="status" value="0"> 审核未通过
					</td>
				</tr>
				<tr>
					<th></th>
					<td>
						<input type="hidden" name="tagid" value="$value[tagid]" />
						<input  type="submit" name="managesubmit" value="确定"> 
					</td>
				</tr>
			</table>
			<!--{/loop}-->
			</div>
		</form>
	<!--{else}-->
	
	<!--{/if}-->
	</div>
<!--{/if}-->
</div>
<div class="side">
	<!--{template admin/tpl/side}-->
</div>

<!--{template admin/tpl/footer}-->